From eabcd59fd980e9f08546ccafef56f0846122f425 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Tue, 8 Jul 2008 09:26:58 +0100 Subject: [PATCH] Fix passthrough of PCI capability structures. Signed-off-by: Naoki Nishiguchi --- tools/ioemu/hw/pass-through.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/ioemu/hw/pass-through.c b/tools/ioemu/hw/pass-through.c index 9facc6ae52..61ac386fa0 100644 --- a/tools/ioemu/hw/pass-through.c +++ b/tools/ioemu/hw/pass-through.c @@ -827,7 +827,7 @@ void pt_iomem_map(PCIDevice *d, int i, uint32_t e_phys, uint32_t e_size, if ( e_size == 0 ) return; - if ( !first_map ) + if ( !first_map && old_ebase != -1 ) { add_msix_mapping(assigned_device, i); /* Remove old mapping */ @@ -883,7 +883,7 @@ void pt_ioport_map(PCIDevice *d, int i, if ( e_size == 0 ) return; - if ( !first_map ) + if ( !first_map && old_ebase != -1 ) { /* Remove old mapping */ ret = xc_domain_ioport_mapping(xc_handle, domid, old_ebase, -- 2.30.2